namespace WebSOAPUI.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class AddAttachmentEntity : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.T_MGT_WebServiceAttachmentEntity",
                c => new
                    {
                        ID = c.Int(nullable: false, identity: true),
                        WebServiceEntityID = c.Int(nullable: false),
                        FileName = c.String(),
                        BinData = c.Binary(),
                    })
                .PrimaryKey(t => t.ID)
                .ForeignKey("dbo.T_MGT_WebServiceEntity", t => t.WebServiceEntityID, cascadeDelete: true)
                .Index(t => t.WebServiceEntityID);
            
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.T_MGT_WebServiceAttachmentEntity", "WebServiceEntityID", "dbo.T_MGT_WebServiceEntity");
            DropIndex("dbo.T_MGT_WebServiceAttachmentEntity", new[] { "WebServiceEntityID" });
            DropTable("dbo.T_MGT_WebServiceAttachmentEntity");
        }
    }
}
